Optimal. Leaf size=239 \[ -\frac {3 \left (b^2-5 a c\right ) \left (b^2-2 a c\right )}{a^3 \left (b^2-4 a c\right )^2 x}+\frac {b^2-2 a c+b c x}{2 a \left (b^2-4 a c\right ) x \left (a+b x+c x^2\right )^2}+\frac {3 b^4-20 a b^2 c+20 a^2 c^2+3 b c \left (b^2-6 a c\right ) x}{2 a^2 \left (b^2-4 a c\right )^2 x \left (a+b x+c x^2\right )}-\frac {3 \left (b^6-10 a b^4 c+30 a^2 b^2 c^2-20 a^3 c^3\right ) \tanh ^{-1}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{a^4 \left (b^2-4 a c\right )^{5/2}}-\frac {3 b \log (x)}{a^4}+\frac {3 b \log \left (a+b x+c x^2\right )}{2 a^4} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.22, antiderivative size = 239, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 7, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.438, Rules used = {754, 836, 814,
648, 632, 212, 642} \begin {gather*} \frac {3 b \log \left (a+b x+c x^2\right )}{2 a^4}-\frac {3 b \log (x)}{a^4}-\frac {3 \left (b^2-5 a c\right ) \left (b^2-2 a c\right )}{a^3 x \left (b^2-4 a c\right )^2}+\frac {20 a^2 c^2+3 b c x \left (b^2-6 a c\right )-20 a b^2 c+3 b^4}{2 a^2 x \left (b^2-4 a c\right )^2 \left (a+b x+c x^2\right )}-\frac {3 \left (-20 a^3 c^3+30 a^2 b^2 c^2-10 a b^4 c+b^6\right ) \tanh ^{-1}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{a^4 \left (b^2-4 a c\right )^{5/2}}+\frac {-2 a c+b^2+b c x}{2 a x \left (b^2-4 a c\right ) \left (a+b x+c x^2\right )^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 632
Rule 642
Rule 648
Rule 754
Rule 814
Rule 836
Rubi steps
\begin {align*} \int \frac {1}{x^2 \left (a+b x+c x^2\right )^3} \, dx &=\frac {b^2-2 a c+b c x}{2 a \left (b^2-4 a c\right ) x \left (a+b x+c x^2\right )^2}-\frac {\int \frac {-3 b^2+10 a c-4 b c x}{x^2 \left (a+b x+c x^2\right )^2} \, dx}{2 a \left (b^2-4 a c\right )}\\ &=\frac {b^2-2 a c+b c x}{2 a \left (b^2-4 a c\right ) x \left (a+b x+c x^2\right )^2}+\frac {3 b^4-20 a b^2 c+20 a^2 c^2+3 b c \left (b^2-6 a c\right ) x}{2 a^2 \left (b^2-4 a c\right )^2 x \left (a+b x+c x^2\right )}+\frac {\int \frac {6 \left (b^2-5 a c\right ) \left (b^2-2 a c\right )+6 b c \left (b^2-6 a c\right ) x}{x^2 \left (a+b x+c x^2\right )} \, dx}{2 a^2 \left (b^2-4 a c\right )^2}\\ &=\frac {b^2-2 a c+b c x}{2 a \left (b^2-4 a c\right ) x \left (a+b x+c x^2\right )^2}+\frac {3 b^4-20 a b^2 c+20 a^2 c^2+3 b c \left (b^2-6 a c\right ) x}{2 a^2 \left (b^2-4 a c\right )^2 x \left (a+b x+c x^2\right )}+\frac {\int \left (\frac {6 \left (b^2-5 a c\right ) \left (b^2-2 a c\right )}{a x^2}-\frac {6 b \left (-b^2+4 a c\right )^2}{a^2 x}+\frac {6 \left (b^6-9 a b^4 c+23 a^2 b^2 c^2-10 a^3 c^3+b c \left (b^2-4 a c\right )^2 x\right )}{a^2 \left (a+b x+c x^2\right )}\right ) \, dx}{2 a^2 \left (b^2-4 a c\right )^2}\\ &=-\frac {3 \left (b^2-5 a c\right ) \left (b^2-2 a c\right )}{a^3 \left (b^2-4 a c\right )^2 x}+\frac {b^2-2 a c+b c x}{2 a \left (b^2-4 a c\right ) x \left (a+b x+c x^2\right )^2}+\frac {3 b^4-20 a b^2 c+20 a^2 c^2+3 b c \left (b^2-6 a c\right ) x}{2 a^2 \left (b^2-4 a c\right )^2 x \left (a+b x+c x^2\right )}-\frac {3 b \log (x)}{a^4}+\frac {3 \int \frac {b^6-9 a b^4 c+23 a^2 b^2 c^2-10 a^3 c^3+b c \left (b^2-4 a c\right )^2 x}{a+b x+c x^2} \, dx}{a^4 \left (b^2-4 a c\right )^2}\\ &=-\frac {3 \left (b^2-5 a c\right ) \left (b^2-2 a c\right )}{a^3 \left (b^2-4 a c\right )^2 x}+\frac {b^2-2 a c+b c x}{2 a \left (b^2-4 a c\right ) x \left (a+b x+c x^2\right )^2}+\frac {3 b^4-20 a b^2 c+20 a^2 c^2+3 b c \left (b^2-6 a c\right ) x}{2 a^2 \left (b^2-4 a c\right )^2 x \left (a+b x+c x^2\right )}-\frac {3 b \log (x)}{a^4}+\frac {(3 b) \int \frac {b+2 c x}{a+b x+c x^2} \, dx}{2 a^4}+\frac {\left (3 \left (b^6-10 a b^4 c+30 a^2 b^2 c^2-20 a^3 c^3\right )\right ) \int \frac {1}{a+b x+c x^2} \, dx}{2 a^4 \left (b^2-4 a c\right )^2}\\ &=-\frac {3 \left (b^2-5 a c\right ) \left (b^2-2 a c\right )}{a^3 \left (b^2-4 a c\right )^2 x}+\frac {b^2-2 a c+b c x}{2 a \left (b^2-4 a c\right ) x \left (a+b x+c x^2\right )^2}+\frac {3 b^4-20 a b^2 c+20 a^2 c^2+3 b c \left (b^2-6 a c\right ) x}{2 a^2 \left (b^2-4 a c\right )^2 x \left (a+b x+c x^2\right )}-\frac {3 b \log (x)}{a^4}+\frac {3 b \log \left (a+b x+c x^2\right )}{2 a^4}-\frac {\left (3 \left (b^6-10 a b^4 c+30 a^2 b^2 c^2-20 a^3 c^3\right )\right ) \text {Subst}\left (\int \frac {1}{b^2-4 a c-x^2} \, dx,x,b+2 c x\right )}{a^4 \left (b^2-4 a c\right )^2}\\ &=-\frac {3 \left (b^2-5 a c\right ) \left (b^2-2 a c\right )}{a^3 \left (b^2-4 a c\right )^2 x}+\frac {b^2-2 a c+b c x}{2 a \left (b^2-4 a c\right ) x \left (a+b x+c x^2\right )^2}+\frac {3 b^4-20 a b^2 c+20 a^2 c^2+3 b c \left (b^2-6 a c\right ) x}{2 a^2 \left (b^2-4 a c\right )^2 x \left (a+b x+c x^2\right )}-\frac {3 \left (b^6-10 a b^4 c+30 a^2 b^2 c^2-20 a^3 c^3\right ) \tanh ^{-1}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{a^4 \left (b^2-4 a c\right )^{5/2}}-\frac {3 b \log (x)}{a^4}+\frac {3 b \log \left (a+b x+c x^2\right )}{2 a^4}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.28, size = 221, normalized size = 0.92 \begin {gather*} \frac {-\frac {2 a}{x}+\frac {a^2 \left (b^3-3 a b c+b^2 c x-2 a c^2 x\right )}{\left (-b^2+4 a c\right ) (a+x (b+c x))^2}-\frac {a \left (4 b^5-29 a b^3 c+46 a^2 b c^2+4 b^4 c x-26 a b^2 c^2 x+28 a^2 c^3 x\right )}{\left (b^2-4 a c\right )^2 (a+x (b+c x))}+\frac {6 \left (b^6-10 a b^4 c+30 a^2 b^2 c^2-20 a^3 c^3\right ) \tan ^{-1}\left (\frac {b+2 c x}{\sqrt {-b^2+4 a c}}\right )}{\left (-b^2+4 a c\right )^{5/2}}-6 b \log (x)+3 b \log (a+x (b+c x))}{2 a^4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.76, size = 404, normalized size = 1.69
method | result | size |
default | \(-\frac {\frac {\frac {c^{2} a \left (14 a^{2} c^{2}-13 a c \,b^{2}+2 b^{4}\right ) x^{3}}{16 a^{2} c^{2}-8 a c \,b^{2}+b^{4}}+\frac {a b c \left (74 a^{2} c^{2}-55 a c \,b^{2}+8 b^{4}\right ) x^{2}}{32 a^{2} c^{2}-16 a c \,b^{2}+2 b^{4}}+\frac {a \left (18 a^{3} c^{3}+7 a^{2} b^{2} c^{2}-12 a \,b^{4} c +2 b^{6}\right ) x}{16 a^{2} c^{2}-8 a c \,b^{2}+b^{4}}+\frac {a^{2} b \left (58 a^{2} c^{2}-36 a c \,b^{2}+5 b^{4}\right )}{32 a^{2} c^{2}-16 a c \,b^{2}+2 b^{4}}}{\left (c \,x^{2}+b x +a \right )^{2}}+\frac {\frac {3 \left (-16 a^{2} b \,c^{3}+8 a \,b^{3} c^{2}-b^{5} c \right ) \ln \left (c \,x^{2}+b x +a \right )}{2 c}+\frac {6 \left (10 a^{3} c^{3}-23 a^{2} b^{2} c^{2}+9 a \,b^{4} c -b^{6}-\frac {\left (-16 a^{2} b \,c^{3}+8 a \,b^{3} c^{2}-b^{5} c \right ) b}{2 c}\right ) \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}}}{16 a^{2} c^{2}-8 a c \,b^{2}+b^{4}}}{a^{4}}-\frac {1}{a^{3} x}-\frac {3 b \ln \left (x \right )}{a^{4}}\) | \(404\) |
risch | \(\frac {-\frac {3 c^{2} \left (10 a^{2} c^{2}-7 a c \,b^{2}+b^{4}\right ) x^{4}}{a^{3} \left (16 a^{2} c^{2}-8 a c \,b^{2}+b^{4}\right )}-\frac {3 b c \left (46 a^{2} c^{2}-29 a c \,b^{2}+4 b^{4}\right ) x^{3}}{2 \left (16 a^{2} c^{2}-8 a c \,b^{2}+b^{4}\right ) a^{3}}-\frac {\left (50 a^{3} c^{3}+7 a^{2} b^{2} c^{2}-18 a \,b^{4} c +3 b^{6}\right ) x^{2}}{a^{3} \left (16 a^{2} c^{2}-8 a c \,b^{2}+b^{4}\right )}-\frac {b \left (122 a^{2} c^{2}-68 a c \,b^{2}+9 b^{4}\right ) x}{2 a^{2} \left (16 a^{2} c^{2}-8 a c \,b^{2}+b^{4}\right )}-\frac {1}{a}}{x \left (c \,x^{2}+b x +a \right )^{2}}-\frac {3 b \ln \left (x \right )}{a^{4}}+3 \left (\munderset {\textit {\_R} =\RootOf \left (\left (1024 a^{9} c^{5}-1280 a^{8} b^{2} c^{4}+640 a^{7} b^{4} c^{3}-160 a^{6} b^{6} c^{2}+20 a^{5} b^{8} c -a^{4} b^{10}\right ) \textit {\_Z}^{2}+\left (-1024 a^{5} b \,c^{5}+1280 a^{4} b^{3} c^{4}-640 a^{3} b^{5} c^{3}+160 a^{2} b^{7} c^{2}-20 a \,b^{9} c +b^{11}\right ) \textit {\_Z} +100 a^{2} c^{6}-44 a \,b^{2} c^{5}+5 b^{4} c^{4}\right )}{\sum }\textit {\_R} \ln \left (\left (\left (1536 a^{11} c^{5}-2048 a^{10} b^{2} c^{4}+1088 a^{9} b^{4} c^{3}-288 a^{8} b^{6} c^{2}+38 a^{7} b^{8} c -2 a^{6} b^{10}\right ) \textit {\_R}^{2}+\left (-608 a^{7} b \,c^{5}+576 a^{6} b^{3} c^{4}-206 a^{5} b^{5} c^{3}+33 a^{4} b^{7} c^{2}-2 a^{3} b^{9} c \right ) \textit {\_R} +100 a^{4} c^{6}-140 a^{3} b^{2} c^{5}+69 a^{2} b^{4} c^{4}-14 a \,b^{6} c^{3}+b^{8} c^{2}\right ) x +\left (-256 a^{11} b \,c^{4}+256 a^{10} b^{3} c^{3}-96 a^{9} b^{5} c^{2}+16 a^{8} b^{7} c -a^{7} b^{9}\right ) \textit {\_R}^{2}+\left (160 a^{8} c^{5}-448 a^{7} b^{2} c^{4}+338 a^{6} b^{4} c^{3}-111 a^{5} b^{6} c^{2}+17 a^{4} b^{8} c -a^{3} b^{10}\right ) \textit {\_R} +160 a^{4} b \,c^{5}-192 a^{3} b^{3} c^{4}+82 a^{2} b^{5} c^{3}-15 a \,b^{7} c^{2}+b^{9} c \right )\right )\) | \(724\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 1130 vs.
\(2 (229) = 458\).
time = 4.31, size = 2280, normalized size = 9.54 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.24, size = 309, normalized size = 1.29 \begin {gather*} \frac {3 \, {\left (b^{6} - 10 \, a b^{4} c + 30 \, a^{2} b^{2} c^{2} - 20 \, a^{3} c^{3}\right )} \arctan \left (\frac {2 \, c x + b}{\sqrt {-b^{2} + 4 \, a c}}\right )}{{\left (a^{4} b^{4} - 8 \, a^{5} b^{2} c + 16 \, a^{6} c^{2}\right )} \sqrt {-b^{2} + 4 \, a c}} + \frac {3 \, b \log \left (c x^{2} + b x + a\right )}{2 \, a^{4}} - \frac {3 \, b \log \left ({\left | x \right |}\right )}{a^{4}} - \frac {2 \, a^{3} b^{4} - 16 \, a^{4} b^{2} c + 32 \, a^{5} c^{2} + 6 \, {\left (a b^{4} c^{2} - 7 \, a^{2} b^{2} c^{3} + 10 \, a^{3} c^{4}\right )} x^{4} + 3 \, {\left (4 \, a b^{5} c - 29 \, a^{2} b^{3} c^{2} + 46 \, a^{3} b c^{3}\right )} x^{3} + 2 \, {\left (3 \, a b^{6} - 18 \, a^{2} b^{4} c + 7 \, a^{3} b^{2} c^{2} + 50 \, a^{4} c^{3}\right )} x^{2} + {\left (9 \, a^{2} b^{5} - 68 \, a^{3} b^{3} c + 122 \, a^{4} b c^{2}\right )} x}{2 \, {\left (c x^{2} + b x + a\right )}^{2} {\left (b^{2} - 4 \, a c\right )}^{2} a^{4} x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 2.02, size = 1255, normalized size = 5.25 \begin {gather*} -\frac {\frac {1}{a}+\frac {x^2\,\left (50\,a^3\,c^3+7\,a^2\,b^2\,c^2-18\,a\,b^4\,c+3\,b^6\right )}{a^3\,\left (16\,a^2\,c^2-8\,a\,b^2\,c+b^4\right )}+\frac {x\,\left (122\,a^2\,b\,c^2-68\,a\,b^3\,c+9\,b^5\right )}{2\,a^2\,\left (16\,a^2\,c^2-8\,a\,b^2\,c+b^4\right )}+\frac {3\,x^3\,\left (46\,a^2\,b\,c^3-29\,a\,b^3\,c^2+4\,b^5\,c\right )}{2\,a^3\,\left (16\,a^2\,c^2-8\,a\,b^2\,c+b^4\right )}+\frac {3\,c^2\,x^4\,\left (10\,a^2\,c^2-7\,a\,b^2\,c+b^4\right )}{a^3\,\left (16\,a^2\,c^2-8\,a\,b^2\,c+b^4\right )}}{x^3\,\left (b^2+2\,a\,c\right )+a^2\,x+c^2\,x^5+2\,a\,b\,x^2+2\,b\,c\,x^4}-\frac {3\,b\,\ln \left (x\right )}{a^4}-\frac {3\,\ln \left (2\,a\,b^{11}+2\,b^{12}\,x+2\,a\,b^6\,\sqrt {-{\left (4\,a\,c-b^2\right )}^5}-39\,a^2\,b^9\,c-1696\,a^6\,b\,c^5+320\,a^6\,c^6\,x+2\,b^7\,x\,\sqrt {-{\left (4\,a\,c-b^2\right )}^5}+303\,a^3\,b^7\,c^2-1170\,a^4\,b^5\,c^3+2240\,a^5\,b^3\,c^4-10\,a^4\,c^3\,\sqrt {-{\left (4\,a\,c-b^2\right )}^5}-17\,a^2\,b^4\,c\,\sqrt {-{\left (4\,a\,c-b^2\right )}^5}+321\,a^2\,b^8\,c^2\,x-1296\,a^3\,b^6\,c^3\,x+2660\,a^4\,b^4\,c^4\,x-2336\,a^5\,b^2\,c^5\,x-40\,a\,b^{10}\,c\,x+39\,a^3\,b^2\,c^2\,\sqrt {-{\left (4\,a\,c-b^2\right )}^5}-20\,a\,b^5\,c\,x\,\sqrt {-{\left (4\,a\,c-b^2\right )}^5}-58\,a^3\,b\,c^3\,x\,\sqrt {-{\left (4\,a\,c-b^2\right )}^5}+63\,a^2\,b^3\,c^2\,x\,\sqrt {-{\left (4\,a\,c-b^2\right )}^5}\right )\,\left (b^{11}+b^6\,\sqrt {-{\left (4\,a\,c-b^2\right )}^5}-1024\,a^5\,b\,c^5+160\,a^2\,b^7\,c^2-640\,a^3\,b^5\,c^3+1280\,a^4\,b^3\,c^4-20\,a^3\,c^3\,\sqrt {-{\left (4\,a\,c-b^2\right )}^5}-20\,a\,b^9\,c+30\,a^2\,b^2\,c^2\,\sqrt {-{\left (4\,a\,c-b^2\right )}^5}-10\,a\,b^4\,c\,\sqrt {-{\left (4\,a\,c-b^2\right )}^5}\right )}{2\,a^4\,{\left (4\,a\,c-b^2\right )}^5}-\frac {3\,\ln \left (2\,a\,b^{11}+2\,b^{12}\,x-2\,a\,b^6\,\sqrt {-{\left (4\,a\,c-b^2\right )}^5}-39\,a^2\,b^9\,c-1696\,a^6\,b\,c^5+320\,a^6\,c^6\,x-2\,b^7\,x\,\sqrt {-{\left (4\,a\,c-b^2\right )}^5}+303\,a^3\,b^7\,c^2-1170\,a^4\,b^5\,c^3+2240\,a^5\,b^3\,c^4+10\,a^4\,c^3\,\sqrt {-{\left (4\,a\,c-b^2\right )}^5}+17\,a^2\,b^4\,c\,\sqrt {-{\left (4\,a\,c-b^2\right )}^5}+321\,a^2\,b^8\,c^2\,x-1296\,a^3\,b^6\,c^3\,x+2660\,a^4\,b^4\,c^4\,x-2336\,a^5\,b^2\,c^5\,x-40\,a\,b^{10}\,c\,x-39\,a^3\,b^2\,c^2\,\sqrt {-{\left (4\,a\,c-b^2\right )}^5}+20\,a\,b^5\,c\,x\,\sqrt {-{\left (4\,a\,c-b^2\right )}^5}+58\,a^3\,b\,c^3\,x\,\sqrt {-{\left (4\,a\,c-b^2\right )}^5}-63\,a^2\,b^3\,c^2\,x\,\sqrt {-{\left (4\,a\,c-b^2\right )}^5}\right )\,\left (b^{11}-b^6\,\sqrt {-{\left (4\,a\,c-b^2\right )}^5}-1024\,a^5\,b\,c^5+160\,a^2\,b^7\,c^2-640\,a^3\,b^5\,c^3+1280\,a^4\,b^3\,c^4+20\,a^3\,c^3\,\sqrt {-{\left (4\,a\,c-b^2\right )}^5}-20\,a\,b^9\,c-30\,a^2\,b^2\,c^2\,\sqrt {-{\left (4\,a\,c-b^2\right )}^5}+10\,a\,b^4\,c\,\sqrt {-{\left (4\,a\,c-b^2\right )}^5}\right )}{2\,a^4\,{\left (4\,a\,c-b^2\right )}^5} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________